<?php

namespace app\api\validate;

use think\Validate;

class ValidateUser extends Validate
{
    protected $rule = [
        'u_name'     => 'require|token',
        'u_password' => 'require',
        'role_id'    => 'require',
        'p_u_id'     => 'require',
        'u_account'  => 'require',
    ];

    protected $scene = [
        'add'  => ['u_name', 'u_password', 'role_id', 'u_fee_rate', 'p_u_id', 'u_account'],
        'edit' => ['u_name', 'role_id', 'u_fee_rate'],
        'pwd'  => ['u_password']
    ];

}